package com.yoi.controller;


import com.yoi.service.impl.BookServiceImpl;
import com.yoi.service.impl.OrderServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@RestController//@RestController=@Controller_@ResponseBody
public class UserController {

    @Autowired
    BookServiceImpl bookService;
    @Autowired
    OrderServiceImpl orderService;

    @RequestMapping("/getAllOrder")
    @ResponseBody
    public Map<String,Object> AllOrder(){
        Map<String,Object> map=new HashMap<>();
        map.put("orders",orderService.AllOrderByRecv("Recv2"));
        return map;
    }

}
